{% extends 'IcsocUIBundle::page.html.twig' %}
{% from 'IcsocUIBundle:Macro:grid.html.twig' import gridWidth,gridNav,gridConfig,gridKeyword,sendKeyWord %}
{% block stylesheet %}
    {{ parent() }}
    {% stylesheets
    '@jqgird_css'
    '@gritter_css'
    filter='cssrewrite' filter='uglifycss'
    %}
    <link rel="stylesheet" href="{{ asset_url }}" />
    {% endstylesheets %}
{% endblock %}

{% block content %}
    {{ gridKeyword('The extension number'|trans) }}
    <table id="grid-table"></table>
    <div id="grid-pager"></div>
{% endblock %}
{% block footer %}
    {% javascripts
    '@jqgird_js'
    '@gritter_js'
    '@common_js'
    filter='uglifyjs'
    %}
    <script src="{{ asset_url }}"></script>
    {% endjavascripts %}
    <script type="text/javascript">
    jQuery(function($) {
        {{ gridWidth() }}
        jQuery(grid_selector).jqGrid({
            url: "{{ path('icsoc_phone_manage_list') }}",  //数据；
            colNames:['{{ 'The extension number'|trans }}', '{{ 'Phone Type'|trans }} ','{{ 'SIP extension password'|trans }}','{{ 'The SIP accession number'|trans }}'],//列显示名称，是一个数组对象
            colModel:[
                {name:'pho_num',index:'pho_num', width:150,editable: true, sortable:true},
                {name:'type_msg',index:'type_msg',width:150,editable:true, sortable:true},
                {name:'pho_pass',index:'pho_pass',width:250,editable:true, sortable:true },
                {name:'sip_number',index:'sip_number',width:160, editable:true, sortable:true }
            ],
            {{ gridConfig() }}
            editurl: "{{ path('icsoc_phone_manage_del') }}",//nothing is saved 定义对form编辑时的url
            caption: "{{ 'The extension list'|trans }}" //表格名称
        });
        {{ gridNav(false,false,true,false,true,true,path('icsoc_phone_manage_add')) }}
    });
    {{ sendKeyWord('phone') }}
    </script>
{% endblock %}